home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / oath.lha / oath / test / anycase.cc < prev    next >
C/C++ Source or Header  |  1991-08-29  |  713b  |  23 lines

  1. #include <iostream.h>
  2.  
  3. #include "oath/oath.h"
  4.  
  5. main ()
  6.    {const char * T = "R";
  7.     if(tolower(*T) == tolower('R') && tolower(*T) == tolower('r'))
  8.         cout << "tolower() seems to work." << endl;
  9.  
  10.     stringA S = minStringA::make("rangeRangeRANGErANGE*", 1);
  11.     stringPosA P = S.makePos();
  12.     cout << "Four tests:" << endl;
  13.     if(P.matchAnyCase("range"))
  14.         cout << " 1 -- range; now at " << *P << endl;
  15.     if(P.matchAnyCase("range"))
  16.         cout << " 2 -- Range; now at " << *P << endl;
  17.     if(P.matchAnyCase("range"))
  18.         cout << " 3 -- RANGE; now at " << *P << endl;
  19.     if(P.matchAnyCase("range"))
  20.         cout << " 4 -- rANGE; now at " << *P << endl;
  21.     cout << "End tests." << endl;
  22.    }
  23.